/*
 * Copyright (c) 2006-2020, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2020-12-21     rst       the first version
 */
#ifndef APPLICATIONS_LTE_INIT_H_
#define APPLICATIONS_AT_API_H_

rt_uint8_t lte_init(void);
void lte_reset(void);
/*TCP/IP函数声明*/
rt_uint8_t tcp_single_Link(rt_uint8_t channel,char *ip_addres,int port);
rt_uint8_t tcp_multiple_links(void);
rt_uint8_t TCP_IP_BreakLink_entry();
rt_uint8_t TCP_IP_BreakTrans_entry();
rt_uint8_t TCP_IP_RepeatTrans();

/* MQTT函数声明 */
rt_uint8_t MQTT_CreateLink_entry(char client_name[],int client_index,char ip_addres[],int keepalive_time,int clean_session);
rt_uint8_t MQTT_BreakLink_entry(int client_index,int timeout);
rt_uint8_t MQTT_Subscribe_topic(int client_index,int topic_lenth,char sub_topic[]);
rt_uint8_t MQTT_Message_topic(int client_index,int msg_topiclenth,char mes_topic[]);
rt_uint8_t MQTT_Messageload(int client_index,int set_loadvalue,char set_load[]);
rt_uint8_t MQTT_SendMessageOnce(int client_index,int qos,int send_timeout);
rt_uint8_t MQTT_Subscribe(int client_index,int qos,int subtoplenth,char topicvalue[]);
rt_uint8_t MQTT_Canceltopic(int client_index,int calcel_toplenth,int dup_flag,char topicvalue[]);
rt_uint8_t MQTT_BreakLink_entry(int client_index,int timeout);

/* APN函数声明 */
rt_uint8_t APN_CreateLink(int cid,int auth_type,char *passwd,char *user,int pdp_state ,char *pdp_type,char *set_apn,int phemode);
/* 串口指令发送函数 */
rt_uint8_t lte_send_cmd(char *cmd,char *res,rt_uint8_t renumber,uint8_t line_num);
void register_messagequeue_init(void);
uint8_t lte_data_send(uint8_t channel,char *data_buffer);
rt_uint8_t lte_channel_send_data(rt_uint8_t channel, char *buf,uint32_t size);


/*A7600模块的URC数据处理 */
void a7600_client_urc_init(void);
/*字符串分割函数*/
void  Data_Delims( char *str,char *b );

void register_messagequeue_init(void);
void register_thread_entry(void *parameter);

#endif /* APPLICATIONS_LTE_INIT_H_ */
